#==============================================================================
# EXTRACT VARIABLE IN A SPECIFIC LINE  [NOT FOR EXPORT]
#==============================================================================
KeywordReadLine<-function(fs, ln, env = SetEnv()) { 
	if (is.numeric(ln) == FALSE) return(NA)
	#fs: file string containing entire parameter file
	#ln: line number to read
	
	line <- str_trim(fs[ln], side = "both") #remove leading/trailing blanks
	line <- unlist(strsplit(line, env$splchar, fixed = TRUE))
	varname <- line[1] #get variable name
	varvalu <- line[2] #get variable value
	#delete comment at end of line if one exists
	varvalu <- unlist(strsplit(varvalu, env$comchar, fixed = TRUE))[1] 
	varvalu <- unlist(strsplit(varvalu, env$vecchar, fixed = TRUE))  #separate vector elements
	varvalu <- gsub(env$quochar, "", varvalu)
	varvalu <- str_trim(varvalu, side = "both") #remove blanks
	
	return(varvalu)
}